.TH Hey 1 "21 May 2000" "" "Documentation for c-hey"
.SH NAME
hey \- send a message to another user
.SH SYNOPSIS
.BR hey 
[ options ] user[.ttyname ] user ...
.SH DESCRIPTION
.B Hey
allows you to communicate with other users, by copying messages from
your terminal to theirs.
.PP
You type the command:  
.B hey username
and press enter.  The message should then be entered.  When you are finished typing the message,
press Ctrl-D.  The message will appear as follows.
.PP
.RS
Message from you@yourhost on yourtty at hh:mm ...
.RS 
.PD 0
oooooooooooooooooooooo
.PP
O    Message Text    O
.PP
oooooooooooooooooooooo
.PD 1
.RE
.RE
.PP
If the message contains any long lines word wrapping will be applied.
.PP
If the other user wants to reply, they must run
.B Hey
as well.
.PP
You can prevent people (other than the super-user) from writing to you with
the
.BR mesg (1)
command.  Some commands, for example
.BR nroff (1)
and
.BR pr (1),
may disallow heying automatically, so that your output isn't overwritten.
.PP
If the user you want to hey to is logged in on to more than one terminal,
you can specify which terminal to 
.B hey
to by specifying the terminal name.
.PP
.RS
hey username.ttyname
.RE
.PP
Alternatively you can allow
.B hey
to select one of the terminals - it will pick the one with the shortest idle
time.  This is so that if the user is logged in at work and also dialed up
from home, the message will go to the right place.
.PP
.SH OPTIONS
.IP \-w\ "<number>"
Word wrap after <number> characters.  <number> must be between 10 and 70, or
.B hey
will wrap after seventy. 
.IP \-t\ "<title>"
Centers the string <title> in title bar of message, so long as <title> is
not more than 70 characters.
.IP \-m 
Ignore potentially annoying mesg n warnings.
.IP \-h
Display
.B hey
help
.IP \-c
Display
.B hey
credits.
.IP \-b\ "<borderstring>"
Used to define the border used for the message. <borderstring> is a nine
character string.  The first character defines the default border character.
All spaces later in the string will be replaced by this character.
.RS
The next four characters contain the top, bottom, left and right of the box. 
These characters will be filled by the default character if the string is less
than 5 characters long. 
.RE
.RS
The next four characters define the characters for the top-left, top-right,
bottom-left and bottom-right of the box.  If the string is five characters
long these will be filled by the default character.  If the string is six,
seven or eight characters long the character for the top-left corner will
be used to fill the remaining corners.  (Spaces here still become the default
character.
.RE
.IP \-s\ "<success_message>"
If you are pedantic about the exit message you can change it from the default:
"groovy" by setting this command line argument.
.RE
.IP \-e\ "<eofstring>"
Used instead of the traditional unix EOF, to indicate end of file, ie. when
you are finished entering a hey. e.g. if eofstring is "." if you enter a
"." on its own line in hey, hey will consider that the end of the hey and
send it accordingly.
.IP \-n\ "<maxnames>"
Used to set the maximum number of usernames displayed as part of the
prompt.
.IP \-p\ "<prompt_string>"
Used to set the hey prompt. The prompt is useful to let you know who you are
heying. Any occurance of the string %u is replaced with a list of the people
you are heying. If you are heying more than <maxnames> people, the string "..." 
will be shown to denote more users. This is to stop the prompt becoming 
unwieldly if you are sending a hey to a large number of users. Any occurance 
of the string %n is replaced with the number of users you are heying. %% is 
replaced by a literal "%".
.PP
.SH "ENVIROMENT VARIABLES"
These enviroment variables allow you to set default values for the above options.
The effects of all these variables are overridden if the appropriate command
line option is used.
.IP HEY_TITLE
Sets the default title.
.IP HEY_BORDERS
Sets default border string.
.IP HEY_WRAP
Sets default width at which to word wrap. 
.IP HEY_SUCCESS
Sets the default success message.
.IP HEY_EOF
Sets a replacement string to use as EOF.
.IP HEY_PROMPT
Sets the hey prompt string
.IP HEY_MAXNAMES
Sets the maximum number of usernames to include as part of the prompt string
.PP
.SH READLINE FUNCTIONS
if c-hey was compiled with readline it will define the following
functions for you to bind to in your inputrc :
.IP hey_line_up
Move <arg> lines up, <arg> is the readline numberic argument (defaults to 1)
.IP hey_line_down
Move <arg> lines down, <arg> is the readline numberic argument (defaults to 1)
.IP hey_carriage_return
A replacement carriage return handler, bound to '\r' by default
.IP hey_refresh
refresh the hey "canvas", bound to ctrl-l by default
.IP hey_arrows
handle the arrow keys, bount to "\e[" and "\eO" by default
.PP
.SH "SEE ALSO"
.BR mesg (1),
.BR talk (1),
.BR who (1),
.BR write (1),
.BR readline (info)
.PP
.SH CREDITS
The C version of hey is by 
.RS 4
Cian Synnott <pooka@redbrick.dcu.ie>
.RE
For a history of hey, check out the 'history' file that comes with the 
distribution of c-hey. The dist is available at 
.RS 4
http://c-hey.redbrick.dcu.ie/

